package md.com.Demo;

import java.util.Random;

public class Task03 {

	public static void main(String[] args) {
		// 定义一个方法，实现的功能是：随机生成银行卡后7位数，返回的数据格式如：0586 756
			System.out.println(getRandomNum());
	}
	
	public static String getRandomNum() {
		Random ran = new Random();
		String num4 = "0000"+ran.nextInt(10000);
		String num3 = "000"+ran.nextInt(1000);
		String result = num4.substring(num4.length()-4) + " "+ 
				num3.substring(num3.length()-3);
		return result;
	}

}